#
# This uses $1, ETOYS_SRPM, which must be a wget-able URL of a SRPM
#   containing the desired tarball, to wget the SRPM and extract the tarball.
# $2, ETOYS_SOURCE, is used to check that the tarball has
#   the same name as expected. 
#

ETOYS_SRPM=$1
ETOYS_SOURCE=$2

wget ${ETOYS_SRPM} -O- | rpm2cpio - | cpio -id ${ETOYS_SOURCE}

if [ ! -e ${ETOYS_SOURCE} ]; then
   echo "ERROR: ${ETOYS_SOURCE} was not found"
   exit 3
fi
